import {debounce} from "./Utils";
import BackTop from "../components/content/BackTop/BackTop";
export const itemListenerMixin = {
    data() {
        return {
            itemListenerMixin: null,
            refresh: null
        }
    },
    mounted() {
        //监听图片加载完就刷新一次页面高度
        this.refresh = debounce(this.$refs.scroll.refresh, 350)
        this.itemImgListener = () => {
            this.refresh()
        }
        this.$bus.$on("ImageLoad", this.itemImgListener)
        // console.log("混入")
    }
}

export const backTop={
    data(){
        return{
            backTopShow: false,
        }
    },
    components:{
        BackTop
    },
    methods:{
        //滑动到顶部
        backClick() {
            this.$refs.scroll.scrollTo(0, 0)
        }
    }
}